﻿{extend name='public/base' /}

{block name='seo' /}
<title>{$title|default='标题'}</title>
<meta name="keywords" content="{$keywords|default='关键字'}">
<meta name="description" content="{$desc|default='描述'}">
{/block}


{block name='content' /}
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		数据管理
		<span class="c-gray en">&gt;</span>
		数据下载
	</nav>
	
	<div class="Hui-article">
		<article class="cl pd-30">
			<!--如果是admin显示用户数量,其它用户没必要显示-->
			<div class="cl pd-5 bg-1 bk-gray">
				<span class="l">
					<span>开始：&nbsp;&nbsp;年度&nbsp;
						<select name="year" id="year1">
							<option value="">选择年份</option>
							{for start='2010' end='date("Y")+2' comparsion='lt' name='i' step='1'}
								{if condition="$i == date('Y')"}
									<option value="{$i}" selected="selected">{$i}</option>
								{else /}
									<option value="{$i}">{$i}</option>
								{/if}
							{/for}
						</select>
					</span>
					<span>月份&nbsp;
						<select name="month" id="month1">
							<option value="">选择月份</option>
							{for start='1' end='12' comparsion='lt' name='i' step='1'}
								{if condition="$i == 1"}
									<option value="{$i}" selected="selected">{$i}</option>
								{else /}
									<option value="{$i}">{$i}</option>
								{/if}
							{/for}
						</select>
					</span>

					<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;结束：&nbsp;&nbsp;年度&nbsp;
						<select name="year" id="year2">
							<option value="">选择年份</option>
							{for start='2010' end='date("Y")+2' comparsion='lt' name='i' step='1'}
								{if condition="$i == date('Y')"}
									<option value="{$i}" selected="selected">{$i}</option>
								{else /}
									<option value="{$i}">{$i}</option>
								{/if}
							{/for}
						</select>
					</span>
					<span>月份&nbsp;
						<select name="month" id="month2">
							<option value="">选择月份</option>
							{for start='1' end='12' comparsion='lt' name='i' step='1'}
								{if condition="$i == date('m')"}
									<option value="{$i}" selected="selected">{$i}</option>
								{else /}
									<option value="{$i}">{$i}</option>
								{/if}
							{/for}
						</select>
					</span>
					<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;表格类型：&nbsp;
						<select name="ttype" id="ttype">
							<option value="">--选择--</option>
							<option value="1">批发表</option>
							<option value="2">零售表</option>
							<option value="3">数据库</option>
						</select>
					</span>
					<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
					<input id="btn" type="button" class="btn btn-primary size-S radius" value="下载表格">
					
				</span>
				
			</div>
		</article>
		<article class="cl pd-30">
			<!--如果是admin显示用户数量,其它用户没必要显示-->
			<div class="cl pd-5 bg-1 bk-gray">
				<span class="btn-upload form-group">
				<form action="{:url('office/updd')}" enctype="multipart/form-data" method="post">
				  <input type="file" name="myfile" />
				  <input type="submit" value="上传" class="btn btn-primary radius">
				</form>
				</span>
			</div>
		</article>
	</div>
</section>
{/block}


{block name='js'}
<script type="text/javascript">
/*
	参数解释：
	title	标题
	url		请求的url
	id		需要操作的数据id
	w		弹出层宽度（缺省调默认值）
	h		弹出层高度（缺省调默认值）
*/
$(document).ready(function(){
	$('#menu-comments dt').attr('class','selected');
	$('#menu-comments dd').attr('style','display: block;');
});


$(function(){
	$("#btn").click(function(){
		// console.log('1234141111111111');
		// alert(this.value);
		// alert($("#ttype").val());
		// $.ajax({
		// 	url:"{:url('office/excelone')}",
		// 	type:'post',
		// 	data:{'typee':$("#ttype").val()},
		// 	dataType:'json',
		// 	success:function(data){
		// 		alert(data.message);
		// 	}
		// });
		window.open("{:url('office/cpcpDb')}");
		
	});
});


</script> 
<!--/请在上方写此页面业务相关的脚本-->
{/block}

</body>
</html>